<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>考试页面</title>
    <link rel="stylesheet" type="text/css" href="/layui/css/layui.css">
    <link href="/css/exampage2.css" rel="stylesheet" type="text/css"/>
    <script src="/js/jquery.js"></script>
    <script src="/layuimoduls/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
</head>
<style>
    body {
        background-color: rgb(230, 237, 240);
    }

    #div1 {
        text-align: center;
    }

    #div2 {
        position: relative;
        width: 100px;
        height: 50px;
        text-align: center;
        line-height: 50px;
        background-color: rgb(183, 239, 247);
    }

    #div2 > div {
        width: 500px;
        height: 50px;
        text-align: left;
        line-height: 50px;
        background: linear-gradient(to right bottom, rgb(183, 239, 247), #11dbe2);
        border-radius: 0 10px 10px 0px;

    }

    #div2 > div > div {
        display: inline;
    }

    #div2 > div > div > span {
        display: inline-block;
        border: 1px solid white;
        width: 25px;
        height: 25px;
        line-height: 25px;
        text-align: center;
        position: relative;
        left: 15px;
    }

    .div4 {
        position: relative;
        left: 20%;
        top: 60px;
    }

    #div5 {
        text-align: center;
    }
</style>
</head>
<body>
<div id="div1">
    <h2>
        <sapn th:text="${examinfo.testName}"></sapn>
    </h2>
    <h3>考试时间：
        <sapn th:text="${examinfo.startTime}"></sapn>
        至<span th:text="${examinfo.endTime}"></span></h3>
</div>
<hr/>
<form class="layui-form layui-form-pane"  th:action="@{/submmitExam}"  method="post">
    <div id="div2">
        题目列表
        <div>
            <div th:each="exam,examStat:${exams}">
                <span th:text="${examStat.count}" th:name="${examStat.count}" class="index"></span>&nbsp;&nbsp;
            </div>
        </div>

    </div>


    <input type="text" name="testId" hidden th:value="${examinfo.testId}" >
    <input type="text" name="username" hidden th:value="${examinfo.username}" >
    <div class="div4" th:each="exam,examStat:${exams}">
        <span id="flag" style="display: none" th:value="${examStat.count}"></span>
        <div th:switch="${exam.type}">
            <div th:case="单选题">
                <span th:text="${examStat.count}"></span>. <span th:text="${exam.stem}"></span>
                <br/><br/>
                <input class="intro" type="radio" th:id="${examStat.count}" th:name="${exam.questionid}" th:value="A">
                <span th:text="${exam.opta}"></span></input><br/><br/>
                <input class="intro" type="radio" th:name="${exam.questionid}" th:value="B">
                <span th:text="${exam.optb}"></span></input><br/><br/>
                <input class="intro" type="radio" th:name="${exam.questionid}" th:value="C">
                <span th:text="${exam.optc}"></span></input><br/><br/>
                <input class="intro" type="radio" th:name="${exam.questionid}" th:value="D">
                <span th:text="${exam.optd}"></span></input><br/><br/>
            </div>
            <hr/>
            <div th:case="填空题">
                <span th:text="${examStat.count}"></span>. <span th:text="${exam.stem}"></span>
                <br/><br/>
                <textarea cols="50" rows="10" class="intro" th:name="${exam.questionid}"></textarea>
            </div>
            <hr/>
            <div th:case="简答题">
                <span th:text="${examStat.count}"></span>. <span th:text="${exam.stem}"></span>
                <br/><br/>
                <textarea cols="50" rows="10" class="intro" th:name="${exam.questionid}"></textarea>
            </div>
            <hr/>
        </div>
    </div>
    <br/><br/>
    <div id="div5">
        <button class="layui-btn" lay-submit>立即提交</button>
    </div>
</form>
</body>

</html>

